<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增牛奶入库')" />
	<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncInputMilk-add">
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">牛奶批次：</label>
				<div class="col-sm-8">
					<input id="inputCode" name="inputCode" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">入库数量（kg）：</label>
				<div class="col-sm-8">
					<input id="inputAmout" name="inputAmout" class="form-control" step="0.1"  type="number" required>
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">剩余量：</label>
				<div class="col-sm-8">
					<input id="leftAmout" name="leftAmout" class="form-control" type="text">
				</div>
			</div>-->
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">瓶数：</label>
				<div class="col-sm-8">
					<input id="bottleAmount" name="bottleAmount" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">挤奶人员：</label>
				<div class="col-sm-8">
					<select class="form-control select2-multiple" id="milkman" name="milkman">
						<option th:each="user:${users}" th:text="${user.userName}" th:value="${user.userId}"></option>
					</select>
				</div>

				<!--<div class="col-sm-8">
					<input id="milkman" name="milkman" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">消毒人员：</label>
				<div class="col-sm-8">
					<select class="form-control select2-multiple" id="disinfector" name="disinfector">
						<option th:each="user:${users}" th:text="${user.userName}" th:value="${user.userId}"></option>
					</select>
				</div>
				<!--<div class="col-sm-8">
					<input id="disinfector" name="disinfector" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入库时间：</label>
				<div class="col-sm-8">
					<input type="text" style="height: 34px;" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" data-type="datetime" required th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" name="inputTime" class="time-input" id="inputTime"/>

					<!--<input id="inputTime" name="inputTime" class="form-control" type="text">-->
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">入库类型 ：字典：</label>
				<div class="col-sm-8">
					<input id="inputType" name="inputType" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">入库经手人：</label>
				<div class="col-sm-8">
					<select class="form-control select2-multiple" id="inputUser" name="inputUser">
						<option th:each="user:${users}" th:text="${user.userName}" th:value="${user.userId}"></option>
					</select>
				</div>
				<!--<div class="col-sm-8">
					<input id="inputUser" name="inputUser" class="form-control" type="text">
				</div>-->
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">创建者：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">创建时间：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
				<textarea input id="remark" name="remark" class="form-control" rows="4" type="text"> </textarea>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
	<th:block th:include="include :: select2-js" />
    <script type="text/javascript">
		var prefix = ctx + "system/ncInputMilk"
		$("#form-ncInputMilk-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-ncInputMilk-add').serialize());
	        }
	    }
	</script>
</body>
</html>
